
angular.module('myApp')
.controller('TableCtrl', ['$scope', '$rootScope', function($scope, $rootScope) {
  $scope.tableData = [
    { id: 1, name: '张三', age: 25 },
    { id: 2, name: '李四', age: 30 },
    { id: 3, name: '王五', age: 28 }
  ];
  // 自定义排序方法（可选）
  $scope.customSort = function(prop, sort) {
    console.log(prop,sort);
  };

  $scope.clickMethod = (row, type) => {
    console.log(row, type);
  }
  console.log($rootScope);
}])
.directive('elTable', elTable)
.directive('elTableColumn', elTableColumn)
.directive('syncScroll', syncScroll);